import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import ArticleView from '../views/ArticleView.vue'
import AboutView from '../views/AboutView.vue'
import photography from '../views/photography.vue'
import a1 from '../views/article/a1.vue'
import a2 from '../views/article/a2.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView
    },
    {
      path: '/about',
      name: 'about',
      // // route level code-splitting
      // // this generates a separate chunk (About.[hash].js) for this route
      // // which is lazy-loaded when the route is visited.
      // component: () => import('../views/AboutView.vue')
      component: AboutView
    },
    {
      path: '/article',
      name: 'article',
      component: ArticleView,
      children : [
        {
            path: 'a1',
            component: a1
        },
        {
            path: 'a2',
            component: a2
        },
          ]
    },
    {
      path: '/photography',
        name: 'photography',
        component: photography
    },
 
  ]
})

export default router
